package cn.briarbear.myblog.repository;

import cn.briarbear.myblog.entity.table.Admin;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

//@CacheConfig(cacheNames = "admin")
public interface AdminRepository extends JpaRepository<Admin,Integer> {

    List<Admin> findByUsernameAndAndPassword(String username,String password);

    Admin findByUsername(String username);

    @Transactional
    void deleteById(Integer id);
}
